package cn.com.nes.mybatis.agent.ope.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

/**
 * <p>
 * 自定义设备参数展示表
 * </p>
 *
 * @author nes
 * @since 2023-04-13
 */
@TableName("equipment_control_param_custom")
public class EquipmentControlParamCustom extends Model<EquipmentControlParamCustom> {

    private static final long serialVersionUID = 1L;

    /**
     * 自增id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 数据项ID或者控制参数表function code
     */
    private String code;
    /**
     * 设备协议id
     */
    @TableField("protocol_id")
    private String protocolId;
    /**
     * 字段名
     */
    @TableField("fieldName")
    private String fieldName;

    @TableField("type")
    private String type;

    /**
     * 是否删除 0-否;1-是
     */
    private Integer sfsc;
    private Integer sort;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getProtocolId() {
        return protocolId;
    }

    public void setProtocolId(String protocolId) {
        this.protocolId = protocolId;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public Integer getSfsc() {
        return sfsc;
    }

    public void setSfsc(Integer sfsc) {
        this.sfsc = sfsc;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public static final String ID = "id";

    public static final String CODE = "code";

    public static final String PROTOCOL_ID = "protocol_id";

    public static final String FIELDNAME = "fieldName";

    public static final String SFSC = "sfsc";

    public static final String SORT = "sort";

    public static final String TYPE = "type";

    @Override
    public Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "EquipmentControlParamCustom{" +
        ", id=" + id +
        ", code=" + code +
        ", protocolId=" + protocolId +
        ", fieldName=" + fieldName +
        ", sfsc=" + sfsc +
        ", sort=" + sort +
        "}";
    }
}
